/*
 * MemoryMapper.h
 *
 *  Created on: Jun 2, 2013
 *
 * Copyright 2013 Mic
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef MEMORYMAPPER_H_
#define MEMORYMAPPER_H_

#include <stdint.h>

class MemoryMapper
{
public:
	virtual ~MemoryMapper() {}

	virtual void Reset() = 0;
	virtual uint8_t ReadByte(uint32_t addr) = 0;
	virtual void WriteByte(uint32_t addr, uint8_t data) = 0;

	virtual uint16_t ReadHalfWord(uint32_t addr) { return 0; }
	virtual void WriteHalfWord(uint32_t addr, uint16_t data) {}

	virtual uint32_t ReadWord(uint32_t addr) { return 0; }
	virtual void WriteWord(uint32_t addr, uint32_t data) {}

	virtual uint8_t ReadPort(uint16_t port) { return 0; }
	virtual void WritePort(uint16_t port, uint8_t data) {}
};


#endif /* MEMORYMAPPER_H_ */
